//////////////////////////////////////////////////////
// MyEngine.h
//////////////////////////////////////////////////////

#pragma once

#include "Engine.h"
#include "TrainingGrounds.h"
#include "Ganjek.h"
#include "Monster.h"
#include "SecondTown.h"
#include "BattleMap.h"

// Quest flags defined in TrainingGrounds.cpp.
//extern BOOL bSpokeToGrewell;


class CMyEngine : public CEngine
{
protected:
    // Shop flags.
    BOOL m_bBuyingPotion;
    BOOL m_bBuyingArmor;
    BOOL m_bBuyingWeapon;
    BOOL m_bRentingRoom;
    int m_iPurchasePrice;
    int m_iNewArmorLevel;
    int m_iNewWeaponLevel;
	

public:
    CMyEngine(char* pstrMap, int iMapType, int iDrawSector, int iSector);
    ~CMyEngine(void);

    void RespondToPlayerLocation();
    BOOL IsBattleLocation();
    CMonster* GetBattleMap();
    void SaveGame(BOOL bShowMessage);
    void LoadGame();
    virtual void HandleKeys(WPARAM wParam);
    void SetPurchasePrice(int iPrice);
    void SetNewWeaponLevel(int iLevel);
    void SetNewArmorLevel(int iLevel);

protected:
    virtual void HandleNPC(int iNPC);
    virtual BOOL HandleContainer(int iSector);
    virtual BOOL HandleDoor(int iSector);
    virtual void HandleN();
    virtual void HandleY();
    void HandleBuyingPotion();
    void HandleBuyingArmor();
    void HandleBuyingWeapon();
    void HandleRentingRoom();
};
